import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = () => new Vuex.Store({

  state: {
    accessToken: ''
  },
  actions: {
    getToken({commit}, data) {
      commit('UPDATEACCESSTOKEN', data)
    }
  },
  mutations: {
     UPDATEACCESSTOKEN(state, payload) {
      state.accessToken = payload;
    }
  }
})

export default store